<?php
/**
 * Created by PhpStorm.
 * User: 12655
 * Date: 2020/6/29
 * Time: 10:11
 */

namespace app\index\service;


class Server extends \think\swoole\Server
{
    protected $host = '127.0.0.1';
    protected $port = 9502;
    protected $option = [
        'worker_num'=> 2,
        'daemonize'	=> true,
        'backlog'	=> 128,
        'task_worker_num' => 4  //任务工作进程
    ];

    public function onConnect($serv, $fd)
    {

    }

    public function onTask($serv, $task_id, $from_id, $data)
    {

    }

    public function onFinish($serv, $task_id, $data)
    {

    }

    public function onReceive($server, $fd, $from_id, $data)
    {

    }

    public function onClose($serv, $fd)
    {

    }
}